﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using YSC_Core.BLL.Domain.BackstageModels;
using YSC_Services.BLL.Services.Interfaces;

namespace YSC_Backstage_Web.Controllers
{
    /// <summary>
    /// 登陆
    /// </summary>
    public class LoginController : Controller
    {
        private IUserBackstageServices _rep;

        public LoginController(IUserBackstageServices rep)
        {
            this._rep = rep;
        }

        public IActionResult Login()
        {
            return View();
        }


        /// <summary>
        /// 登陆接口
        /// </summary>
        /// <param name="userName"></param>
        /// <param name="passWord"></param>
        /// <returns></returns>
       // [HttpGet]
        public JsonResult UserLogin(string Phone, string Password)   //LoginModel model
        {
             var ret = _rep.Login(Phone, Password);          
            return Json(ret);
        }
    }
}